package com.itheima.homework;

/*设计一个方法，用于比较两个相同数据类型数组的内容是否相同*/
public class HomeWork3 {
    public static void main(String[] args) {
        int[] arr1 = {11, 12, 13};
        int[] arr2 = {11, 12, 13};
        bJ(arr1,arr2);
    }

    public static void bJ(int[] arr1, int[] arr2) {
        int count=0;
        if (arr1.length == arr2.length) {
            for (int i = 0; i < arr1.length; i++) {
                if(arr1[i] == arr2[i]){
                    count++;
                }
            }

        }
        if(count== arr1.length){
            System.out.println("数组的内容是相同");
        }else{
            System.out.println("数组的内容不相同");
        }
    }
}
